/**
  ETFAna project, Anyang Normal University && IMP-CAS
  \class ETFTrack
  \brief class for a post-Mag track, i.e. track downstream of the dipole magnet
  \author SUN Yazhou, asia.rabbit@163.com
  \since 2021-11-04
  \date 2021-12-11 last modified
  \attention
  changelog
  <table>
  <tr>  <th>Date         <th>Author      <th>Description                   </tr>
  <tr>  <td>2021-11-04   <td>Asia Sun    <td>file created                  </tr>
  </table>

  \copyright Copyright (c) 2021-2024 Anyang Normal U. && IMP-CAS with LGPLv3 LICENSE
*/

#ifndef ETFTrack_h
#define ETFTrack_h

#include "ETFVTrack.h"

class ETFDCHit;

class ETFTrack : public ETFVTrack{
public:
  ETFTrack();
  ETFTrack(const ETFTrack &t); ///< copy ctor
  ETFTrack &operator=(const ETFTrack &t); ///< assignment ctor
  virtual ~ETFTrack();

  virtual void copy(const ETFVTrack *t) override; ///< the same as copy ctor
  virtual void Initialize() override;
  virtual int EnoughHit() override; ///< specify the criteria that how many hits qualify a good track
  static int EnoughHit(const map<int, ETFDCHit *> &hits); ///< a static version

  void SetFiredStripId(double id){ fFiredStripId = id; }
  void SetNStripStray(double str){ fNStripStray = str; }
  /// number the track, set the name&title for the track
  virtual void SetId(int id, short type) override;
  void Set3DId(int id){ f3DId = id; }
  /// assign hit pos at det's central plane
  virtual void UpdateHitPos(ETFDetector *d) override;

  int GetFiredStripId() const{ return fFiredStripId; }
  double GetNStripStray() const{ return fNStripStray; }
  int Get3DId() const{ return f3DId; }
  virtual void Print(const char *opt = "") const override; ///< print the detector info

  ClassDefOverride(ETFTrack, 1);

protected:
  int fFiredStripId; ///< serial id of the fired TOF wall strip for the track
  double fNStripStray; ///< count of strips from a fired strips to the fitted track

  int f3DId; ///< 3-D track identifier
};

#endif
